'a string'
Main Entry Points
Keyword |
Usage |
ACCESSPATTERN |
|
ARRAYTABLE |
|
AUTO_INCREMENT |
|
AVG |
|
COLUMNS |
|
CONTENT |
|
COUNT |
|
DELIMITER |
|
DENSE_RANK |
|
DISABLED |
|
DOCUMENT |
|
EMPTY |
|
ENABLED |
|
ENCODING |
|
EVERY |
|
EXTRACT |
|
FIRST |
|
HEADER |
|
INDEX |
|
INSTEAD |
|
KEY |
table element, create temporary table, foreign key, non-reserved identifier |
LAST |
|
MAX |
|
MIN |
|
NAME |
|
NAMESPACE |
|
NEXT |
|
NULLS |
|
ORDINALITY |
|
PASSING |
|
PATH |
|
QUERYSTRING |
|
QUOTE |
|
RANK |
|
RESULT |
|
ROW_NUMBER |
|
SELECTOR |
|
SERIAL |
|
SKIP |
|
SQL_TSI_DAY |
|
SQL_TSI_FRAC_SECOND |
|
SQL_TSI_HOUR |
|
SQL_TSI_MINUTE |
|
SQL_TSI_MONTH |
|
SQL_TSI_QUARTER |
|
SQL_TSI_SECOND |
|
SQL_TSI_WEEK |
|
SQL_TSI_YEAR |
|
STDDEV_POP |
|
STDDEV_SAMP |
|
SUBSTRING |
|
SUM |
|
TEXTAGG |
|
TEXTTABLE |
|
TIMESTAMPADD |
|
TIMESTAMPDIFF |
|
TO_BYTES |
|
TO_CHARS |
|
TRIM |
|
VAR_POP |
|
VAR_SAMP |
|
VIEW |
|
WELLFORMED |
|
WIDTH |
ADD |
ALLOCATE |
ARE |
ARRAY |
ASENSITIVE |
ASYMETRIC |
AUTHORIZATION |
BINARY |
CALLED |
CASCADED |
CHARACTER |
CHECK |
CLOSE |
COLLATE |
COLUMN |
COMMIT |
CONNECT |
CORRESPONDING |
CRITERIA |
CURRENT_DATE |
CURRENT_TIME |
CURRENT_TIMESTAMP |
CURRENT_USER |
CURSOR |
CYCLE |
DATALINK |
DEALLOCATE |
DEC |
DEREF |
DESCRIBE |
DETERMINISTIC |
DISCONNECT |
DLNEWCOPY |
DLPREVIOUSCOPY |
DLURLCOMPLETE |
DLURLCOMPLETEONLY |
DLURLCOMPLETEWRITE |
DLURLPATH |
DLURLPATHONLY |
DLURLPATHWRITE |
DLURLSCHEME |
DLURLSERVER |
DLVALUE |
DYNAMIC |
ELEMENT |
EXTERNAL |
FREE |
GET |
GLOBAL |
GRANT |
HAS |
HOLD |
IDENTITY |
IMPORT |
INDICATOR |
INPUT |
INSENSITIVE |
INT |
INTERVAL |
ISOLATION |
LANGUAGE |
LARGE |
LOCALTIME |
LOCALTIMESTAMP |
MATCH |
MEMBER |
MERGE |
METHOD |
MODIFIES |
MODULE |
MULTISET |
NATIONAL |
NATURAL |
NCHAR |
NCLOB |
NEW |
NONE |
NUMERIC |
OLD |
OPEN |
OUTPUT |
OVERLAPS |
PARAMETER |
PRECISION |
PREPARE |
RANGE |
READS |
RECURSIVE |
REFERENCING |
RELEASE |
RETURN |
REVOKE |
ROLLBACK |
ROLLUP |
SAVEPOINT |
SCROLL |
SEARCH |
SENSITIVE |
SESSION_USER |
SPECIFIC |
SPECIFICTYPE |
SQL |
SQLEXCEPTION |
SQLSTATE |
SQLWARNING |
START |
STATIC |
SUBMULTILIST |
SYMETRIC |
SYSTEM |
SYSTEM_USER |
TIMEZONE_HOUR |
TIMEZONE_MINUTE |
TRANSLATION |
TREAT |
VALUE |
VARYING |
WHENEVER |
WINDOW |
WITHIN |
WITHOUT |
XMLBINARY |
XMLCAST |
XMLDOCUMENT |
XMLEXISTS |
XMLITERATE |
XMLTEXT |
XMLVALIDATE |
A string literal value. Use '' to escape ' in the string.
Example:
'a string'
'it''s a string'
Allows non-reserved keywords to be parsed as identifiers
Example:
SELECT COUNT FROM ...
Partial or full name of a single entity.
Example:
tbl.col
"tbl"."col"
Creates a trigger action on the given target.
Example:
CREATE TRIGGER ON vw INSTEAD OF INSERT AS FOR EACH ROW BEGIN ATOMIC ... END
ALTER ( ( VIEW <identifier> AS <query expression> ) | ( PROCEDURE <identifier> AS <statement> ) | ( TRIGGER ON <identifier> INSTEAD OF ( INSERT | UPDATE | DELETE ) ( ( AS <for each row trigger action> ) | ENABLED | DISABLED ) ) ) |
Alter the given target.
Example:
ALTER VIEW vw AS SELECT col FROM tbl
Defines an action to perform on each row.
Example:
FOR EACH ROW BEGIN ATOMIC ... END
<alter> |
A statement that can be executed at runtime.
Example:
SELECT * FROM tbl
Creates a trigger action on the given target.
Example:
CREATE TRIGGER ON vw INSTEAD OF INSERT AS FOR EACH ROW BEGIN ATOMIC ... END
CREATE LOCAL TEMPORARY TABLE <identifier> <lparen> <temporary table element> ( <comma> <temporary table element> )* ( <comma> PRIMARY KEY <lparen> <identifier> ( <comma> <identifier> )* <rparen> )? <rparen> |
Creates a temporary table.
Example:
CREATE LOCAL TEMPORARY TABLE tmp (col integer)
<identifier> ( <data type> | SERIAL ) ( NOT NULL )? |
Defines a temporary table column.
Example:
col string NOT NULL
Raises an error with the given message.
Example:
ERROR 'something went wrong'
( ( <identifier> <colon> )? ( <loop statement> | <while statement> | <compound statement> ) ) |
A procedure statement.
Example:
IF (x = 5) BEGIN ... END
( <assignment statement> | <data statement> | <raise error statement> | <declare statement> | <branching statement> ) <semicolon> |
A procedure statement terminated by ;.
Example:
SELECT * FROM tbl;
A procedure statement block contained in BEGIN END.
Example:
BEGIN NOT ATOMIC ... END
( ( BREAK | CONTINUE ) ( <identifier> )? ) |
( LEAVE <identifier> ) |
A procedure branching control statement, which typically specifies a label to return control to.
Example:
BREAK x
A procedure while statement that executes until its condition is false.
Example:
WHILE (var) BEGIN ... END
LOOP ON <lparen> <query expression> <rparen> AS <identifier> <statement> |
A procedure loop statement that executes over the given cursor.
Example:
LOOP ON (SELECT * FROM tbl) AS x BEGIN ... END
A procedure loop statement that executes over the given cursor.
Example:
LOOP ON (SELECT * FROM tbl) AS x BEGIN ... END
DECLARE <data type> <identifier> ( ( <colon> )? <eq> <assignment statement operand> )? |
A procedure declaration statement that creates a variable and optionally assigns a value.
Example:
DECLARE STRING x := 'a'
<identifier> ( <colon> )? <eq> <assignment statement operand> |
Assigns a variable a value in a procedure.
Example:
x := 'b'
A value or command that can be used in an assignment.
All assigments except for expression are deprecated.
( <identifier> ( <colon> )? <eq> <call statement> ) |
A procedure statement that executes a SQL statement. An update statement can have its update count accessed via the ROWS_UPDATED variable.
Defines a procedure body on a Procedure metadata object.
Example:
CREATE VIRTUAL PROCEDURE BEGIN ... END
( EXECUTE | EXEC ) ( STRING | IMMEDIATE )? <expression> ( AS <typed element list> ( INTO <identifier> )? )? ( USING <set clause list> )? ( UPDATE ( <unsigned integer> | <star> ) )? |
A procedure statement that can execute arbitrary sql.
Example:
EXECUTE IMMEDIATE 'SELECT * FROM tbl' AS x STRING INTO #temp
<identifier> <eq> <expression> ( <comma> <identifier> <eq> <expression> )* |
A list of value assignments.
Example:
col1 = 'x', col2 = 'y' ...
<identifier> <data type> ( <comma> <identifier> <data type> )* |
A list of typed elements.
Example:
col1 string, col2 integer ...
<lbrace> ( <qmark> <eq> )? CALL <identifier> ( <lparen> ( <expression list> )? <rparen> )? <rbrace> ( <option clause> )? |
A callable statement defined using JDBC escape syntax.
Example:
{? = CALL proc}
( ( EXEC | EXECUTE | CALL ) <identifier> <lparen> ( <named parameter list> | ( <expression list> )? ) <rparen> ) ( <option clause> )? |
Executes the procedure with the given parameters.
Example:
CALL proc('a', 1)
( <identifier> <eq> ( <gt> )? <expression> ( <comma> <identifier> <eq> ( <gt> )? <expression> )* ) |
A list of named parameters.
Example:
param1 => 'x', param2 => 1
INSERT INTO <identifier> ( <column list> )? ( ( VALUES <lparen> <expression list> <rparen> ) | <query expression> ) ( <option clause> )? |
Inserts values into the given target.
Example:
INSERT INTO tbl (col1, col2) VALUES ('a', 1)
<lparen> <identifier> ( <comma> <identifier> )* <rparen> |
A list of column references.
Example:
(col1, col2, ...)
<expression> ( <comma> <expression> )* |
A list of expressions.
Example:
col1, 'a', ...
UPDATE <identifier> SET <set clause list> ( <where clause> )? ( <option clause> )? |
Update values in the given target.
Example:
UPDATE tbl SET (col1 = 'a') WHERE col2 = 1
DELETE FROM <identifier> ( <where clause> )? ( <option clause> )? |
Delete rows from the given target.
Example:
DELETE FROM tbl WHERE col2 = 1
( WITH <with list element> ( <comma> <with list element> )* )? <query expression body> |
A declarative query for data.
Example:
SELECT * FROM tbl WHERE col2 = 1
<identifier> ( <column list> )? AS <lparen> <query expression> <rparen> |
A query expression for use in the enclosing query.
Example:
X (Y, Z) AS (SELECT 1, 2)
<query term> ( ( UNION | EXCEPT ) ( ALL | DISTINCT )? <query term> )* ( <order by clause> )? ( <limit clause> )? ( <option clause> )? |
The body of a query expression, which can optionally be ordered and limited.
Example:
SELECT * FROM tbl ORDER BY col1 LIMIT 1
<query primary> ( INTERSECT ( ALL | DISTINCT )? <query primary> )* |
Used to establish INTERSECT precedence.
Example:
SELECT * FROM tbl
SELECT * FROM tbl1 INTERSECT SELECT * FROM tbl2
<query> |
( TABLE <identifier> ) |
( <lparen> <query expression body> <rparen> ) |
A declarative source of rows.
Example:
TABLE tbl
SELECT * FROM tbl1
<select clause> ( <into clause> )? ( <from clause> ( <where clause> )? ( <group by clause> )? ( <having clause> )? )? |
A SELECT query.
Example:
SELECT col1, max(col2) FROM tbl GROUP BY col1
Used to direct the query into a table.
This is deprecated. Use INSERT INTO with a query expression instead.
Example:
INTO tbl
SELECT ( ALL | DISTINCT )? ( <star> | ( <select sublist> ( <comma> <select sublist> )* ) ) |
The columns returned by a query. Can optionally be distinct.
Example:
SELECT *
SELECT DISTINCT a, b, c
( <expression> ( ( AS )? <identifier> )? ) |
A select clause item that selects a single column.
This is slightly different than a derived column in that the AS keyword is optional.
Example:
tbl.col AS x
( <expression> ( AS <identifier> )? ) |
An optionally named expression.
Example:
tbl.col AS x
A select sublist that can select all columns from the given group.
Example:
tbl.*
( XMLAGG | ARRAY_AGG ) <lparen> <expression> ( <order by clause> )? <rparen> |
An aggregate function that can optionally be ordered.
Example:
XMLAGG(col1) ORDER BY col2
ARRAY_AGG(col1)
TEXTAGG <lparen> ( FOR )? <derived column> ( <comma> <derived column> )* ( DELIMITER <character> )? ( QUOTE <character> )? ( HEADER )? ( ENCODING <identifier> )? ( <order by clause> )? <rparen> |
An aggregate function for creating separated value clobs.
Example:
TEXTAGG (col1 as t1, col2 as t2 DELIMITER ',' HEADER)
A standard aggregate function.
Example:
COUNT(*)
( ROW_NUMBER | RANK | DENSE_RANK ) <lparen> <rparen> |
An analytic aggregate function.
Example:
ROW_NUMBER()
FILTER <lparen> WHERE <boolean primary> <rparen> |
An aggregate filter clause applied prior to accumulating the value.
Example:
FILTER (WHERE col1='a')
FROM ( <table reference> ( <comma> <table reference> )* ) |
A query from clause containing a list of table references.
Example:
FROM a, b
FROM a right outer join b, c, d join e".</p>
( <escaped join> <joined table> <rbrace> ) |
An optionally escaped joined table.
Example:
a
a inner join b
<table primary> ( <cross join> | <qualified table> )* |
A table or join.
Example:
a
a inner join b
An INNER or OUTER join.
Example:
a inner join b
( <text table> | <array table> | <xml table> | <table name> | <table subquery> | ( <lparen> <joined table> <rparen> ) ) ( MAKEDEP | MAKENOTDEP )? |
A single source of rows.
Example:
a
XMLSERIALIZE <lparen> ( DOCUMENT | CONTENT )? <expression> ( AS ( STRING | VARCHAR | CLOB ) )? <rparen> |
Serializes an XML value.
Example:
XMLSERIALIZE(col1 AS CLOB)
ARRAYTABLE <lparen> <value expression primary> COLUMNS <typed element list> <rparen> ( AS )? <identifier> |
The ARRAYTABLE table function creates tabular results from arrays. It can be used as a nested table reference.
Example:
ARRAYTABLE (col1 COLUMNS x STRING) AS y
TEXTTABLE <lparen> <common value expression> ( SELECTOR <string> )? COLUMNS <text table column> ( <comma> <text table column> )* ( NO ROW DELIMITER )? ( DELIMITER <character> )? ( ( ESCAPE <character> ) | ( QUOTE <character> ) )? ( HEADER ( <unsigned integer> )? )? ( SKIP <unsigned integer> )? <rparen> ( AS )? <identifier> |
The TEXTTABLE table function creates tabular results from text. It can be used as a nested table reference.
Example:
TEXTTABLE (file COLUMNS x STRING) AS y
<identifier> <data type> ( WIDTH <unsigned integer> ( NO TRIM )? )? ( SELECTOR <string> <unsigned integer> )? |
A text table column.
Example:
x INTEGER WIDTH 6
XMLQUERY <lparen> ( <xml namespaces> <comma> )? <string> ( PASSING <derived column> ( <comma> <derived column> )* )? ( ( NULL | EMPTY ) ON EMPTY )? <rparen> |
Executes an XQuery to return an XML result.
Example:
XMLQUERY('<a>...</a>' PASSING doc)
XMLTABLE <lparen> ( <xml namespaces> <comma> )? <string> ( PASSING <derived column> ( <comma> <derived column> )* )? ( COLUMNS <xml table column> ( <comma> <xml table column> )* )? <rparen> ( AS )? <identifier> |
Returns table results by processing an XQuery.
Example:
XMLTABLE('/a/b' PASSING doc COLUMNS col XML PATH '.') AS X
<identifier> ( ( FOR ORDINALITY ) | ( <data type> ( DEFAULT <expression> )? ( PATH <string> )? ) ) |
XML table column.
Example:
y FOR ORDINALITY
( TABLE | LATERAL )? <lparen> ( <query expression> | <call statement> ) <rparen> ( AS )? <identifier> |
A table defined by a subquery.
Example:
(SELECT * FROM tbl) AS x
( <identifier> ( ( AS )? <identifier> )? ) |
A table named in the FROM clause.
Example:
tbl AS x
<boolean term> ( OR <boolean term> )* |
An optionally ORed boolean expression.
( <common value expression> ( <between predicate> | <match predicate> | <like regex predicate> | <in predicate> | <is null predicate> | <quantified comparison predicate> | <comparison predicate> )? ) |
A boolean predicate or simple expression.
Example:
col LIKE 'a%'
A value comparison.
Example:
x = 'a'
<lparen> ( <query expression> | <call statement> ) <rparen> |
A subquery.
Example:
(SELECT * FROM tbl)
<comparison operator> ( ANY | SOME | ALL ) <subquery> |
A subquery comparison.
Example:
= ANY (SELECT col FROM tbl)
Matches based upon a pattern.
Example:
LIKE 'a_'
( NOT )? LIKE_REGEX <common value expression> |
A regular expression match.
Example:
LIKE_REGEX 'a.*b'
A comparison between two values.
Example:
BETWEEN 1 AND 5
( NOT )? IN ( <subquery> | ( <lparen> <common value expression> ( <comma> <common value expression> )* <rparen> ) ) |
A comparison with multiple values.
Example:
IN (1, 5)
Defines the grouping columns
Example:
GROUP BY col1, col2
Search condition applied after grouping.
Example:
HAVING max(col1) = 5
ORDER BY <sort specification> ( <comma> <sort specification> )* |
Specifices row ordering.
Example:
ORDER BY x, y DESC
Defines how to sort on a particular expression
Example:
col1 NULLS FIRST
( LIMIT <integer parameter> ( <comma> <integer parameter> )? ) |
( OFFSET <integer parameter> ( ROW | ROWS ) ( <fetch clause> )? ) |
Limits and/or offsets the resultant rows.
Example:
LIMIT 2
ANSI limit.
Example:
FETCH FIRST 1 ROWS ONLY
OPTION ( MAKEDEP <identifier> ( <comma> <identifier> )* | MAKENOTDEP <identifier> ( <comma> <identifier> )* | NOCACHE ( <identifier> ( <comma> <identifier> )* )? )* |
Specifies query options.
Example:
OPTION MAKEDEP tbl
( <numeric value expression> ( <concat_op> <numeric value expression> )* ) |
Establishes the precedence of concat.
Example:
'a' || 'b'
( <value expression primary> ( <star or slash> <value expression primary> )* ) |
A numeric term
Example:
1 * 2
( <plus or minus> )? ( <unsigned numeric literal> | <unsigned value expression primary> ) |
A simple value expression.
Example:
+col1
<qmark> |
( <dollar> <unsigned integer> ) |
( <escaped function> <function> <rbrace> ) |
( ( <text aggreate function> | <standard aggregate function> | <ordered aggreate function> ) ( <filter clause> )? ( <window specification> )? ) |
( <analytic aggregate function> ( <filter clause> )? <window specification> ) |
( <function> ( <window specification> )? ) |
( ( <identifier> | <non-reserved identifier> ) ( <lsbrace> <unsigned integer> <rsbrace> )? ) |
<subquery> |
( <lparen> <expression> <rparen> ( <lsbrace> <unsigned integer> <rsbrace> )? ) |
An unsigned simple value expression.
Example:
col1
OVER <lparen> ( PARTITION BY <expression list> )? ( <order by clause> )? <rparen> |
The window specification for an analytical or windowed aggregate function.
Example:
OVER (PARTION BY col1)
CASE <expression> ( WHEN <expression> THEN <expression> )+ ( ELSE <expression> )? END |
If/then/else chain using a common search predicand.
Example:
CASE col1 WHEN 'a' THEN 1 ELSE 2
CASE ( WHEN <condition> THEN <expression> )+ ( ELSE <expression> )? END |
If/then/else chain using multiple search conditions.
Example:
CASE WHEN x = 'a' THEN 1 WHEN y = 'b' THEN 2
( SUBSTRING <lparen> <expression> ( ( FROM <expression> ( FOR <expression> )? ) | ( <comma> <expression list> ) ) <rparen> ) |
( TRIM <lparen> ( ( ( ( LEADING | TRAILING | BOTH ) ( <expression> )? ) | <expression> ) FROM )? <expression> <rparen> ) |
( ( TIMESTAMPADD | TIMESTAMPDIFF ) <lparen> <time interval> <comma> <expression> <comma> <expression> <rparen> ) |
( ( TRANSLATE | INSERT ) <lparen> ( <expression list> )? <rparen> ) |
( XMLPI <lparen> ( ( NAME )? <identifier> ) ( <comma> <expression> )? <rparen> ) |
( <identifier> <lparen> ( ALL | DISTINCT )? ( <expression list> )? ( <order by clause> )? <rparen> ( <filter clause> )? ) |
Calls a scalar function.
Example:
func('1', col1)
XMLPARSE <lparen> ( DOCUMENT | CONTENT ) <expression> ( WELLFORMED )? <rparen> |
Parses the given value as XML.
Example:
XMLPARSE(DOCUMENT doc WELLFORMED)
QUERYSTRING <lparen> <expression> ( <comma> <derived column> )* <rparen> |
Produces a URL query string from the given arguments.
Example:
QUERYSTRING(col1 AS opt, col2 AS val)
XMLELEMENT <lparen> ( ( NAME )? <identifier> ) ( <comma> <xml namespaces> )? ( <comma> <xml attributes> )? ( <comma> <expression> )* <rparen> |
Creates an XML element.
Example:
XMLELEMENT(NAME "root", child)
XMLATTRIBUTES <lparen> <derived column> ( <comma> <derived column> )* <rparen> |
Creates attributes for the containing element.
Example:
XMLATTRIBUTES(col1 AS attr1, col2 AS attr2)
XMLFOREST <lparen> ( <xml namespaces> <comma> )? <derived column> ( <comma> <derived column> )* <rparen> |
Produces an element for each derived column.
Example:
XMLFOREST(col1 AS ELEM1, col2 AS ELEM2)
XMLNAMESPACES <lparen> <xml namespace element> ( <comma> <xml namespace element> )* <rparen> |
Defines XML namespace URI/prefix combinations
Example:
XMLNAMESPACES('http://foo' AS foo)
( STRING ( <lparen> <unsigned integer> <rparen> )? ) |
( VARCHAR ( <lparen> <unsigned integer> <rparen> )? ) |
( CHAR ( <lparen> <unsigned integer> <rparen> )? ) |
( BIGINTEGER ( <lparen> <unsigned integer> <rparen> )? ) |
( BIGDECIMAL ( <lparen> <unsigned integer> ( <comma> <unsigned integer> )? <rparen> )? ) |
( DECIMAL ( <lparen> <unsigned integer> ( <comma> <unsigned integer> )? <rparen> )? ) |
( BLOB ( <lparen> <unsigned integer> <rparen> )? ) |
( CLOB ( <lparen> <unsigned integer> <rparen> )? ) |
( VARBINARY ( <lparen> <unsigned integer> <rparen> )? ) |
A data type.
Example:
STRING
A time interval keyword.
Example:
SQL_TSI_HOUR
<string> |
( <escaped type> <string> <rbrace> ) |
An escaped or simple non numeric literal.
Example:
'a'
An unsigned numeric literal value.
Example:
1.234
( <create table> | <create procedure> | <option namespace> | <create trigger> ) ( <semicolon> )? |
A data definition statement.
Example:
CREATE FOREIGN TABLE X (Y STRING)
SET NAMESPACE <string> AS <identifier> |
A namespace used to shorten the full name of an option key.
Example:
SET NAMESPACE 'http://foo' AS foo
CREATE ( VIRTUAL | FOREIGN )? ( PROCEDURE | FUNCTION ) ( <identifier> <lparen> ( <procedure parameter> )? ( <comma> <procedure parameter> )* <rparen> ( RETURNS ( ( ( TABLE )? <lparen> <procedure result column> ( <comma> <procedure result column> )* <rparen> ) | <data type> ) )? ( <options clause> )? ( AS <statement> )? ) |
Defines a procedure or function invocation.
Example:
CREATE FOREIGN PROCEDURE proc (param STRING) RETURNS STRING
A procedure or function parameter
Example:
OUT x INTEGER
<identifier> <data type> ( NOT NULL )? ( <options clause> )? |
A procedure result column.
Example:
x INTEGER
CREATE ( FOREIGN TABLE | ( VIRTUAL )? VIEW ) <identifier> ( <lparen> <table element> ( <comma> <table element> )* ( CONSTRAINT ( <primary key> | <other constraints> | <foreign key> ) ( <comma> ( <primary key> | <other constraints> | <foreign key> ) )* )? <rparen> )? ( <options clause> )? ( AS <query expression> )? |
Defines a table or view.
Example:
CREATE VIEW vw AS SELECT 1
FOREIGN KEY <column name list> REFERENCES <identifier> ( <column name list> )? ( <options clause> )? |
Defines the foreign key referential constraint.
Example:
FOREIGN KEY (a, b) REFERENCES tbl (x, y)
PRIMARY KEY ( <options clause> )? |
Defines the primary key.
Example:
PRIMARY KEY (a, b)
( UNIQUE | INDEX | ACCESSPATTERN ) ( <options clause> )? |
Defines ACCESSPATTERN and UNIQUE constraints and INDEXes.
Example:
UNIQUE (a)
<lparen> <identifier> ( <comma> <identifier> )* <rparen> |
A list of column names.
Example:
(a, b)
<identifier> <data type> ( NOT NULL )? ( UNIQUE | ( INDEX | AUTO_INCREMENT )+ | ( PRIMARY KEY ) )? ( DEFAULT <string> )? ( <options clause> )? |
Defines a table column.
Example:
x INTEGER NOT NULL
OPTIONS <lparen> <option pair> ( <comma> <option pair> )* <rparen> |
A list of statement options.
Example:
OPTIONS ('x' 'y', 'a' 'b')
<identifier> ( <non numeric literal> | ( <plus or minus> )? <unsigned numeric literal> ) |
An option key/value pair.
Example:
'key' 'value'